package com.lizanyi.teaFriend.test;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import javax.sql.DataSource;
import java.sql.SQLException;

public class test {
    @Test
    public void testDataSources() throws SQLException {
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:WEB-INF/applicationContext.xml");
        DataSource dataSource=ac.getBean(DataSource.class);

        System.out.println(dataSource.getConnection());
    }

}
